Skip to content

Fix TaskAssemblyLocationMismatch message - #12509

Merged
YuliiaKovalova merged 2 commits into
mainfrom
dev/ykovalova/fix_logging
Sep 10, 2025
Merged

YuliiaKovalova merged 2 commits into
mainfrom
dev/ykovalova/fix_logging

Conversation

@YuliiaKovalova

@YuliiaKovalova YuliiaKovalova commented Sep 10, 2025 •

Copy link
Copy Markdown
Member

Fixes #11954

Context

When a custom task executed, it's wrapped with TaskHostTask type.
Due to that the validation for TaskAssemblyLocationMismatch contained a bug.

Fix

Validate underlined loaded type in TaskHostTask.

Copilot AI review requested due to automatic review settings September 10, 2025 12:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the TaskAssemblyLocationMismatch validation logic when custom tasks are wrapped with TaskHostTask. The issue was that the validation was checking the wrong assembly location, leading to false positive warnings.

  • Adds a new property LoadedTaskAssemblyInfo to TaskHostTask to expose the underlying task assembly information
  • Updates the assembly location validation logic to properly handle TaskHostTask wrappers by checking the actual loaded task assembly
  • Adds comprehensive test coverage to verify the fix prevents false positive TaskAssemblyLocationMismatch messages

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
TaskHostTask.cs Adds LoadedTaskAssemblyInfo property to expose underlying task assembly information
TaskExecutionHost.cs Updates assembly location validation with detailed comments and proper TaskHostTask handling
NetTaskHost_E2E_Tests.cs Adds test to verify the fix prevents false positive assembly mismatch warnings

@YuliiaKovalova YuliiaKovalova self-assigned this Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix bug for logging TaskAssemblyLocationMismatch comment

4 participants